<template>
  <div class="home">
    <card  :busLevel="busLevel" :guideLevel="guideLevel" :supLevel="supLevel"/>
    <div>这是移动端的卡片</div>
    <div>地址栏输入about跳转到拖拽界面</div>
    <div>卡片路径是components/card</div>
    <div>拖拽路径是views/about</div>
  </div>
</template>

<script>
import card from '@/components/card.vue'
import {banners} from "@/api/index";
export default {
    name: 'Home',
    data(){
        return{
            busLevel:'',//推荐
            guideLevel:'',//指导
            supLevel:'',//引荐
        }
    },
    methods:{
        async getBanners(){
            const {data} = await banners();
            const{busLevel,guideLevel,supLevel} = data;
            this.busLevel = busLevel;
            this.guideLevel = guideLevel;
            this.supLevel = supLevel;
            console.log(busLevel, guideLevel, supLevel);
        }
    },
    async mounted() {
       await this.getBanners();

    },
    components: {
      card
    }
}
</script>
